<?php 
/****
布尔教育 高端PHP培训
培  训: http://www.itbool.com
论  坛: http://www.zixue.it
****/

class Car{

}
class BWM extends Car{
	public function run(){
		echo 'BWM dadada';
	}
}

class QQ extends Car{
	public function run(){
		echo 'QQ wuwuwuwuw';
	}
}

function drive($car){
	$car->run();
}

drive(new BWM);
drive(new QQ);
?>